
<script setup lang="ts">
	import { getMemberOrderPreAPI, getMemberOrderPreNowAPI } from '@/services/order'
  import type {OrderPreResult} from '@/types/order.d.ts'
  import {ref} from 'vue'
	// 页面参数
	const query = defineProps<{
	  skuId?: string
	  count?: string
	}>()

	// 获取订单信息
	const orderPre = ref<OrderPreResult>()
	const getMemberOrderPreData = async () => {
	  // 是否有立即购买参数
	  if (query.count && query.skuId) {
	    // 调用立即购买 API
	    const res = await getMemberOrderPreNowAPI({
	      count: query.count,
	      skuId: query.skuId,
	    })
	    orderPre.value = res.result
	  } else {
	    // 调用预付订单 API
	    const res = await getMemberOrderPreAPI()
	    orderPre.value = res.result
	  }
	}
</script>
<template>
	<view>

	</view>
</template>
<style>

</style>
